{% load my_tags %}
{% load static %}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

name: --------------{{ name }}<hr/>

name|lower:--------------{{ name|lower }}<hr/>
name|first|upper:--------------{{ name|first|upper }}<hr/>

bio|truncatewords:"30":--------------{{ bio|truncatewords:"30" }}<hr/>

pub_date|date:"F j, Y" :--------------{{ pub_date|date:"F j, Y" }}<hr/>

name|default:"菜鸟教程666":--------------{{ name|default:"菜鸟教程666" }}<hr/>


name|length:--------------{{ name|length }}<hr/>
num|filesizeformat:--------------{{ num|filesizeformat }}<hr/>

time|date:"Y-m-d":--------------{{ time|date:"Y-m-d" }}<hr/>

bio|truncatechars:2 :--------------{{ bio|truncatechars:2 }}<hr/>

views_str|safe:--------------{{ views_str|safe }}

<hr/>
num-------
{{ num }}

<br/>

{% if num > 90 and num <= 100 %}
    优秀
{% elif num > 60 and num <= 90 %}
    合格
{% else %}
    一边玩去～
{% endif %}


<hr/>
{% for i in views_list %}
    <hr/>
    {{ i }}
    {{ forloop.counter0 }}
    {{ forloop.revcounter }}
    {{ forloop.revcounter0 }}
    {{ forloop.first }}
    {{ forloop.last }}
{% endfor %}
<br/>

<hr/>
{% ifequal section 'sitenews' %}
    <h1>Site News</h1>
{% else %}
    <h1>No News Here</h1>
{% endifequal %}

<hr/>


<hr/>
<h2>自定义标签和过滤器</h2>
{{ 11|my_filter:22 }}
<h2>在 HTML 中使用自定义过滤器。</h2>

{{ 11|my_filter:22 }}

<h2>在 HTML 中使用自定义标签</h2>
{% my_tag1 11 22 33 %}
<br/>
{% my_html 'id' 'class' %}

<hr/>
{{name}}<img src="{% static "images/runoob-logo.png" %}" alt="runoob-logo">

</body>
</html>